import javax.swing.*;
import javax.swing.border.Border;
import java.awt.*;

/**
 * 我方牌库容器
 * 用于显示抽骨牌模式抽到的超出MtLibrary显示范围的牌
 * 由于时间原因此抽骨牌模式未能实现
 */
public class MyScrollLibrary extends JScrollPane {
    /**
     * 滚动界面实例
     */
    public static MyScrollLibrary Instance = new MyScrollLibrary();
    /**
     * 滚动面板初始化
     */
    public void Init(){

        Border colorfulLine = BorderFactory.createLineBorder(Color.darkGray);
        MyLibrary.Instance.Init();
        setViewportView(MyLibrary.Instance);
        Instance.setBounds(380,700,820,200);
        Instance.setVisible(true);
        Instance.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
        Instance.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
        Instance.setBorder(colorfulLine);
        System.out.println(getX()+" "+getY());
    }
}
